﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Odyssey.Web.Models
{
    public class CookieManager
    {
        public static void Clear()
        {
            HttpContext.Current.Response.Cookies.Clear();
        }

        public static void Set(string key, string value)
        {
            HttpContext.Current.Response.SetCookie(new HttpCookie(key,value));
        }

        public static string Get(string key)
        {
            HttpCookie cookie = HttpContext.Current.Request.Cookies[key];
            if (cookie == null)
            {
                return string.Empty;
            }
            return cookie.Value;
        }
    }
}